BST Insert Algorithm

To insert a new key, we traverse the tree from the root, just like a search. When we find a null link where the node should go, we add it there.

Insert a Key

Log: